The present invention relates generally to the field of improving the process of saving and restoring registers, and more particularly to preserving registers that do not need to be accessed immediately to free up more storage space.
Central processing units (CPUs) are the hardware within a computer that carry out instructions of computer programs by performing basic arithmetical, logical, control and input/output operations of the system. The fundamental operation of most CPUs, is to execute a sequence of stored instructions called a program. These instructions are stored in memory. The memory can be in many forms such as cache, random access memory (RAM), flash memory, and hard drives. The CPU performs many functions, three of the common functions performed by a CPU are fetch, decode, and execute instructions.
The instructions, instruction set, or instruction set architecture (ISA), is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception handling. The instruction includes an operation code (opcode) that specifies the operation to perform, such as add content of memory to registers, which may specify registers, memory location, or literal data. The length of an instruction varies widely, from as little as one bits to many hundreds of bits in some systems.
Computer storage can be in many forms and can be accessed at different speeds. Registers, and cache memory are some of the memory types that can be accessed the fastest, while random-access memory (RAM) and hard drives are each accessed at a much slower rate. The register is the smallest, fastest cache in the system, the registers retrieve information from the main memory instead of store memory. Registers are memory cells built in the CPU that include specific data needed by the CPU. Registers are an integral part of the CPU itself, as the registers provide information for the CPU to process. Such registers are typically accessed by mechanisms other than those used by main memory and can be accessed faster. Registers are measured by the amount of bits they can hold. A bit is a basic unit of information in a computer that is most commonly represented by a “1” or a “0”, as used in binary code. The processor uses the registers for quick access to instructions, a storage address, or any other kind of data the processor needs such as, for example, a bit sequence or individual characters.